package salercomputer.CPU;

import salercomputer.model.Component;
import salercomputer.myInterface.Workable;

public class CPU extends Component implements Workable {
    private int coreNum;

    public CPU(String name, Double price,int coreNum) {
        super(name, price);
        this.coreNum=coreNum;
    }

    public int getCoreNum() {
        return coreNum;
    }

    public void setCoreNum(int coreNum) {
        this.coreNum = coreNum;
    }

    @Override
    public void work() {

    }

    @Override
    public String description() {
        StringBuilder descriptionStr = new StringBuilder();
        descriptionStr.append(super.description())
                .append("Core Name:{")
                .append(coreNum)
                .append("}");
        return descriptionStr.toString();
    }
}
